package com.cec.mapper.admin;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cec.entity.Role;
import com.cec.entity.User;
import com.cec.vo.UserVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author lt
 * @since 2024-10-25
 */
@Repository("adminMapper") // 代表持久层
public interface UserMapper extends BaseMapper<User> {

    @Select("select id,role_name roleName from role")
    List<Role> getRole();

    IPage<UserVO> queryPageUserList(Page<User> page, @Param(Constants.WRAPPER) QueryWrapper<User> wrapper);
}
